import { ref } from 'vue'

export function useShoppingAI() {
  const productList = ref<any[]>([])
  const loading = ref(false)

  async function recognizeProduct(image: File) {
    loading.value = true
    // TODO: 调用商品识别API，返回商品列表
    // 示例：productList.value = await fetchProductList(image)
    loading.value = false
  }

  return {
    productList,
    loading,
    recognizeProduct
  }
}